﻿package com.zouloux.physics.events 
{
	import com.zouloux.physics.IPhysicsObject;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author ZoulouX
	 */
	public class PhysicsEvent extends Event 
	{
		public static const COLLISION:String = "collision";
		public static const UPDATE:String = "update";
		
		public var collisionWith:IPhysicsObject;
		public var angle:Number;
		public var distance:Number;
		public var correction:Number;
		
		public function PhysicsEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
		}
		public override function clone():Event 
		{ 
			return new PhysicsEvent(type, bubbles, cancelable);
		}
		public override function toString():String 
		{ 
			return formatToString("PhysicsEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		}
}